package com.ziq.zcamp.topics


import android.content.Context
import android.content.Intent
import com.ziq.base.base.BaseActivity
import com.ziq.zcamp.bean.topics.TopicsDetailsInfo
import com.ziq.zcamp.manager.GlobalContextManager
import dagger.hilt.android.AndroidEntryPoint

/**
 * 话题详情界面
 */
@AndroidEntryPoint
class TopicsDetailsActivity : BaseActivity() {

    companion object {
        private const val TOPICS_NAME = "topics_name"
        private const val TOPICS_DETAILS = "topics_details"
        private const val TOPICS_SOURCE = "topics_source"

        fun open(context: Context, name : String, topicsDetails : TopicsDetailsInfo?= null, source : String? = null){
            val intent = Intent(context, TopicsDetailsActivity::class.java)
            intent.putExtra(TOPICS_NAME,name.replace("#",""))
            if (source!=null){
                intent.putExtra(TOPICS_SOURCE,source)
            }
            if (topicsDetails!=null){
                intent.putExtra(TOPICS_DETAILS,topicsDetails)
            }
            GlobalContextManager.startActivity(context, intent)
        }
    }


}